<?php

namespace DesignModel\database;
class pdo implements Db
{
    protected $conn;

    public function connect($host, $user, $password, $db_name)
    {
        $conn = new \PDO("mysql:host=$host;dbname=$db_name", $user, $password);
        $this->conn = $conn;
    }

    public function query($query)
    {
        return $this->conn->query($query);
    }

    public function close()
    {
        unset($this->conn);
    }
}